package fr.uniscol.siecle.model;

import java.io.Serializable;

public class Pays implements Serializable, DonneeSiecle {

	private int code = 0;
	
	private String libelle = null;

	public Pays() {
	}

	public Pays(int code, String libelle) {
		super();
		this.code = code;
		this.libelle = libelle;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getLibelle() {
		if(libelle == null){
			libelle = "";
		}
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}

	@Override
	public boolean equals(Object obj) {
		Pays p = (Pays)obj;
		return getCode() == p.getCode();
	}

	@Override
	public int hashCode() {
		return getCode();
	}
}
